/*
 * @Description:
 * @Author: cheung0
 * @Date: 2021-11-19 13:05:14
 */
import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/Login/Login'
import Main from '../views/Main.vue'

Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        redirect: '/login',
    },
    {
        path: "/login",
        name:"login",
        component: Login,
    },
    {
        path: '/back',
        component: Main,
        children: [
            {
                path: '/back/home',
                name: 'home',
                component: () => import('../views/Home/Home'),
            },
            {
                path: '/back/message',
                name: 'message',
                component: () => import('../views/Message/Message'),
            },
            {
                path: '/back/user',
                name: 'user',
                component: () => import('../views/User/User'),
            },
        ],
    },
]

const router = new VueRouter({
    routes
})

export default router
